(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 7.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[     30417,        780]
NotebookOptionsPosition[     27345,        674]
NotebookOutlinePosition[     27907,        695]
CellTagsIndexPosition[     27864,        692]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{

Cell[CellGroupData[{
Cell["Microarray Gene Expression Analysis", "Title",
 CellChangeTimes->{{3.4448837771488934`*^9, 3.444883784562468*^9}}],

Cell["Exploratory Analysis", "Subtitle",
 CellChangeTimes->{{3.444883789132296*^9, 3.4448838210671864`*^9}, {
  3.445391028678052*^9, 3.4453910346818438`*^9}}],

Cell["Hans - Martin Will, Ph.D.", "Subsubtitle"],

Cell[TextData[{
 "Copyright \[Copyright] 2009 Hans-Martin Will. This notebook is licensed \
under the ",
 ButtonBox["Creative Commons Attribution 3.0 License",
  BaseStyle->"Hyperlink",
  ButtonData->{
    URL["http://creativecommons.org/licenses/by/3.0"], None},
  ButtonNote->"http://creativecommons.org/licenses/by/3.0"],
 ".  Distributions of this notebook in modified or unmodified form need to \
include this notice."
}], "Text",
 CellChangeTimes->{{3.444885583784873*^9, 3.44488571568578*^9}, 
   3.444885750604946*^9, {3.4448857808997927`*^9, 3.444885794228957*^9}, {
   3.444885849778867*^9, 3.444885895263208*^9}, {3.444885988618767*^9, 
   3.444886023721356*^9}, {3.444886679102549*^9, 3.4448867925795593`*^9}, {
   3.444886828004525*^9, 3.444886879056986*^9}, {3.4448869480613832`*^9, 
   3.44488696792741*^9}, {3.445135694625877*^9, 3.445135722559115*^9}, {
   3.445228305643272*^9, 3.445228330267249*^9}, 3.445393604139647*^9},
 FontWeight->"Bold"],

Cell[BoxData[
 GraphicsBox[
  TagBox[RasterBox[CompressedData["
1:eJztmU1PG1cUhi11HcSeRcku7GirdJlaSn8A7aq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FYv7zc7O4khgwg7kl0ZJJWAijV3SoPCuX1hEWrOnRxz6+mQv
GUbhk5QNLBxknym7b93lFQMMRPnDUBQSR7Wj4XDQvDkYh1HkzYnCYd1DHSXO
4HsdNVgX2CZplB2mr7pwN/qri/Xx1dV9fbKvJQ7wSXlHjk+2GHBon1QodJ0F
7NyF8bVgG9E6S/KmVNSkPzfVe/MmUAQ74RYI3Ah08ma1kzdTuRvnTfd2y+tu
qaO0qHZXBR6jt446dOooFuBSR910qXXLmzx8qdpdV19b3rvD37p6jDjoOuvd
X3+qJIdZZ4VDDMI6iwFl6a1fY7yvs8aIA7H0fEnW3Y9+fqRQXLvagjbd6+5m
7cXLF4H/cjz95Qn5ruXtOwyNnNLvMPe/vY8iqEPAc3wz8C1+fb5ECQQUyoqA
t+9ygNBo1d/+8dbHh1HM9dB9yscb9Q0bCtP+TotXePpOG5bvtIa/IARck+3a
uQUQJBCIfrdnmld9tw+9Cdnf7a0GnUchhy4+aKPvNxoQX3/zVSQWIZlSV5if
/sexOv/jWBzq/zjReOTBdw9G8QzjUkRvMMHXv73O5DOd//WczTQ4pJFTI0JA
YhL48BnG/wgHHBD+BZWSnD0=
    "], {{0, 31}, {88, 0}}, {0, 255},
    ColorFunction->RGBColor],
   BoxForm`ImageTag["Byte", ColorSpace -> "RGB", Interleaving -> True],
   Selectable->False],
  BaseStyle->"ImageGraphics",
  ImageSize->Automatic,
  ImageSizeRaw->{88, 31},
  PlotRange->{{0, 88}, {0, 31}}]], "Text"],

Cell[CellGroupData[{

Cell["Introduction", "Section",
 CellChangeTimes->{{3.444452911443905*^9, 3.4444529126249113`*^9}, {
  3.444453002881036*^9, 3.444453009109371*^9}, {3.4444531720085497`*^9, 
  3.44445317619203*^9}}],

Cell[CellGroupData[{

Cell["Gene Expression Microarrays", "Subsection",
 CellChangeTimes->{{3.4452284697091217`*^9, 3.445228482800082*^9}}],

Cell["\<\
DNA Microarrays organize DNA oligonucleotides in a spatial arrangement on a \
small glass plate, plastic or silicon substrate. Microarrays can contain up \
to millions of probes, and can be used to perform many genetic or genomic \
tests in parallel. The use of microarrays for gene expression propfiles was \
first reported by Schena at al. (1995), and the representation of a complete \
eukaryotic genome (Saccharomyces cerevisiae) on a microarray was reported by \
Lashkari et al. (1997).\
\>", "Text",
 CellChangeTimes->{{3.444887353346092*^9, 3.444887363050329*^9}, {
  3.44488741517548*^9, 3.44488744377776*^9}, {3.4448874788086863`*^9, 
  3.4448877124559107`*^9}}],

Cell["\<\
For gene expression profiling experiments, the expression levels of thousands \
of gene transcripts are simultaneously monitored to study and determine the \
effects of treatments, disease conditions or developmental conditions. For \
example, gene expression profiling can be used to identify genes whose \
expression is changed when exposed to toxicants or genes expression \
differently in tumor cells and cancer cell lines in comparison to non-tumor \
tissue. \
\>", "Text",
 CellChangeTimes->{{3.4448877585607033`*^9, 3.444887985660445*^9}}],

Cell["\<\
A major design criterion for manufactoring microarrays is the choice between \
single-channel and two-channel arrays. Single-channel arrays are designed to \
measure estimates of absolute abundance of transcript expression. For \
single-channel arrays, a single sample preparation is hybridized to the \
array. For comparative analysis across conditions, expression levels need to \
be compared between data points collected from multiple arrays. Common \
commercial single-channel arrays are those manufactored and distributed by \
Affymetrix \"Gene Chip\", the Applied Microarrays \"CodeLink\" arrays, and \
the Eppendorf \"DualChip & Silverquant\". \
\>", "Text",
 CellChangeTimes->{{3.4448880180829897`*^9, 3.444888260869218*^9}, {
  3.444888301776121*^9, 3.444888349899485*^9}, {3.444888603426197*^9, 
  3.4448886074266253`*^9}}],

Cell["\<\
When using dual-channel arrays, cDNA prepared from two different samples is \
first labeled with different fluorescent dyes before being hybridized to the \
array. Common dyes are Cy3 with a fluorescence emission wavelength of 570 nm \
(green part of the light spectrum), and Cy5 with an emission wavelength of \
670 nm (red part of the light spectrum). The relative intensities of each \
fluorophore can then be used to perform ratio-based analysis to identify \
genes with different expression levels in the two samples.\
\>", "Text",
 CellChangeTimes->{{3.444888336265398*^9, 3.444888582753827*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Lung Cancer Data Set", "Subsection",
 CellChangeTimes->{{3.445228498389434*^9, 3.4452285023921947`*^9}}],

Cell[TextData[{
 "For our computational example we will use helper functions from the \
Bioinformatica package. As data set, we will use a data set discussed by \
Raponi et al. (2006), which has been deposited in the NCBI GEO data \
repository under accession code GDS2373. In this study, primary squamous cell \
lung carcinomas from 129 patients have been profiled using Affymetrix U133A \
gene chips. Non-small-cell lung cancers (NSCLC) compose 80% of all lung \
carcinomas with squamous cell carcinomas (SCC), and adenocarcinoma are \
representing the majority of these tumors. These data is of interest because \
a prognostic signature could be used to identify patients with early-stage \
high-risk NSCLC who might benefit from adjuvant therapy following surgery. In \
this first tutorial, we will be more concerned with the overall workflow of \
an analysis of microarrays using ",
 StyleBox["Mathematica",
  FontSlant->"Italic"],
 " rather than focusing on the most advisable statistical approaches. Those \
more advanced discussions might be the focus of specialized tutorials at a \
later stage. "
}], "Text",
 CellChangeTimes->{{3.4451679609001017`*^9, 3.4451679937817497`*^9}, {
  3.445168024196751*^9, 3.445168024914763*^9}, {3.445168086468685*^9, 
  3.4451681136165743`*^9}, {3.4451683264976883`*^9, 3.445168371253716*^9}, {
  3.445168675471032*^9, 3.4451686848692408`*^9}, {3.445168829705173*^9, 
  3.445168863678011*^9}, {3.4451688958378773`*^9, 3.445168935909285*^9}, {
  3.445168974416506*^9, 3.44516897847499*^9}, {3.445228520174803*^9, 
  3.445228520521166*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Accessing the Bioinformatica Package", "Subsection",
 CellChangeTimes->{{3.445228523247863*^9, 3.445228533927959*^9}}],

Cell[TextData[{
 "Throughout this tutorial we will make use of a small package called ",
 StyleBox["Bioinformatica`",
  FontWeight->"Bold"],
 " containing useful bioinformatics helper functions."
}], "Text",
 CellChangeTimes->{{3.445224988580904*^9, 3.445225082579658*^9}, {
   3.4452283658901043`*^9, 3.4452284581917267`*^9}, 3.445228517079393*^9}],

Cell[BoxData[
 RowBox[{"<<", "Bioinformatica`"}]], "Input",
 CellChangeTimes->{{3.445134528978896*^9, 3.445134556239543*^9}, {
  3.445136013849811*^9, 3.445136015415406*^9}, {3.445167942995329*^9, 
  3.4451679471910343`*^9}}]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Preparing the Data Sets", "Section",
 CellChangeTimes->{{3.4453930779830914`*^9, 3.445393104380583*^9}}],

Cell[CellGroupData[{

Cell["Retrieving the Data Sets", "Subsection",
 CellChangeTimes->{{3.445393107944096*^9, 3.4453931190146914`*^9}}],

Cell[BoxData[
 RowBox[{"<<", "\"\<GDS2373.mx\>\""}]], "Input"],

Cell[BoxData[{
 RowBox[{
  RowBox[{"logIntensity", " ", "=", " ", 
   RowBox[{
   "analysisData", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"logratio", " ", "=", " ", 
   RowBox[{
   "analysisData", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"logIntensityAvg", " ", "=", " ", 
   RowBox[{
   "analysisData", "\[LeftDoubleBracket]", "3", "\[RightDoubleBracket]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"geneIDs", " ", "=", " ", 
   RowBox[{
   "analysisData", "\[LeftDoubleBracket]", "4", "\[RightDoubleBracket]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"sampleIDs", " ", "=", " ", 
   RowBox[{
   "analysisData", "\[LeftDoubleBracket]", "5", "\[RightDoubleBracket]"}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"subsets", " ", "=", " ", 
   RowBox[{
   "analysisData", "\[LeftDoubleBracket]", "6", "\[RightDoubleBracket]"}]}], 
  ";"}]}], "Input",
 CellChangeTimes->{{3.44557133753098*^9, 3.445571412891934*^9}}],

Cell["how to read back the previously saved data", "Text",
 CellChangeTimes->{{3.445393136299571*^9, 3.4453931641475897`*^9}}],

Cell[CellGroupData[{

Cell[BoxData["geneIDs"], "Input",
 CellChangeTimes->{{3.445571421949387*^9, 3.445571433386792*^9}}],

Cell[BoxData[
 InterpretationBox[
  TagBox[
   PanelBox[GridBox[{
      {
       StyleBox[
        StyleBox[
         DynamicBox[ToBoxes[
           FEPrivate`FrontEndResource["FEStrings", "sizeExplanation"], 
           StandardForm],
          ImageSizeCache->{278., {3., 8.}}],
         StripOnInput->False,
         DynamicUpdating->True], "Panel",
        StripOnInput->False,
        Background->None]},
      {
       ItemBox[
        TagBox[
         RowBox[{"{", 
          
          RowBox[{"\<\"DDR1\"\>", ",", "\<\"RFC2\"\>", ",", "\<\"HSPA6\"\>", 
           ",", "\<\"PAX8\"\>", ",", "\<\"GUCA1A\"\>", ",", "\<\"UBA7\"\>", 
           ",", "\<\"THRA\"\>", ",", "\<\"PTPN21\"\>", ",", "\<\"CCL5\"\>", 
           ",", "\<\"CYP2E1\"\>", ",", "\<\"EPHB3\"\>", ",", "\<\"ESRRA\"\>", 
           ",", "\<\"CYP2A6\"\>", ",", "\<\"GAS6\"\>", ",", "\<\"MMP14\"\>", 
           ",", "\<\"TRADD\"\>", ",", "\<\"FNTB\"\>", ",", "\<\"PLD1\"\>", 
           ",", "\<\"PMS2L11\"\>", ",", "\<\"BAD\"\>", ",", "\<\"PRPF8\"\>", 
           ",", "\<\"CAPNS1\"\>", ",", "\<\"RPL35\"\>", ",", "\<\"RPL28\"\>", 
           ",", "\<\"EIF4G2\"\>", ",", 
           RowBox[{"\[LeftSkeleton]", "22165", "\[RightSkeleton]"}], 
           ",", "\<\"FKBP15\"\>", ",", "\<\"RABEP2\"\>", ",", "\<\"MT1P3\"\>",
            ",", "\<\"ZNF335\"\>", ",", "\<\"LOC100129250\"\>", 
           ",", "\<\"ZNF783\"\>", ",", "\<\"SLC35E1\"\>", 
           ",", "\<\"LOC23117\"\>", ",", "\<\"AI744451\"\>", 
           ",", "\<\"CX3CL1\"\>", ",", "\<\"ABHD2\"\>", ",", "\<\"NPEPL1\"\>",
            ",", "\<\"PCIF1\"\>", ",", "\<\"ACSM5\"\>", ",", "\<\"CENTA1\"\>",
            ",", "\<\"LRCH4\"\>", ",", "\<\"LRTM1\"\>", ",", "\<\"DGCR8\"\>", 
           ",", "\<\"EXOSC4\"\>", ",", "\<\"EXOSC4\"\>", 
           ",", "\<\"EHBP1L1\"\>", ",", "\<\"MEX3D\"\>", 
           ",", "\<\"EPS8L1\"\>", ",", "\<\"BCAN\"\>", 
           ",", "\<\"LOC90379\"\>"}], "}"}],
         Short[#, 5]& ],
        Background->GrayLevel[1],
        BaseStyle->{Deployed -> False},
        Frame->True,
        FrameStyle->GrayLevel[0, 0.2],
        StripOnInput->False]},
      {
       RowBox[{
        ButtonBox[
         StyleBox[
          StyleBox[
           DynamicBox[ToBoxes[
             FEPrivate`FrontEndResource["FEStrings", "sizeShowLess"], 
             StandardForm],
            ImageSizeCache->{49., {1., 8.}}],
           StripOnInput->False,
           DynamicUpdating->True], "Panel",
          StripOnInput->False,
          Background->None],
         Appearance->Automatic,
         ButtonFunction:>OutputSizeLimit`ButtonFunction[
          Identity, 16, 22580729042051624112, 5/2],
         Enabled->True,
         Evaluator->Automatic,
         Method->"Queued"], "\[ThinSpace]", 
        ButtonBox[
         StyleBox[
          StyleBox[
           DynamicBox[ToBoxes[
             FEPrivate`FrontEndResource["FEStrings", "sizeShowMore"], 
             StandardForm],
            ImageSizeCache->{52., {1., 8.}}],
           StripOnInput->False,
           DynamicUpdating->True], "Panel",
          StripOnInput->False,
          Background->None],
         Appearance->Automatic,
         ButtonFunction:>OutputSizeLimit`ButtonFunction[
          Identity, 16, 22580729042051624112, 5 2],
         Enabled->True,
         Evaluator->Automatic,
         Method->"Queued"], "\[ThinSpace]", 
        ButtonBox[
         StyleBox[
          StyleBox[
           DynamicBox[ToBoxes[
             FEPrivate`FrontEndResource["FEStrings", "sizeShowAll"], 
             StandardForm],
            ImageSizeCache->{82., {2., 8.}}],
           StripOnInput->False,
           DynamicUpdating->True], "Panel",
          StripOnInput->False,
          Background->None],
         Appearance->Automatic,
         ButtonFunction:>OutputSizeLimit`ButtonFunction[
          Identity, 16, 22580729042051624112, Infinity],
         Enabled->True,
         Evaluator->Automatic,
         Method->"Queued"], "\[ThinSpace]", 
        ButtonBox[
         StyleBox[
          StyleBox[
           DynamicBox[ToBoxes[
             FEPrivate`FrontEndResource["FEStrings", "sizeChangeLimit"], 
             StandardForm],
            ImageSizeCache->{74., {1., 8.}}],
           StripOnInput->False,
           DynamicUpdating->True], "Panel",
          StripOnInput->False,
          Background->None],
         Appearance->Automatic,
         ButtonFunction:>FrontEndExecute[{
            FrontEnd`SetOptions[
            FrontEnd`$FrontEnd, 
             FrontEnd`PreferencesSettings -> {"Page" -> "Evaluation"}], 
            FrontEnd`FrontEndToken["PreferencesDialog"]}],
         Evaluator->None,
         Method->"Preemptive"]}]}
     },
     GridBoxAlignment->{
      "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, 
       "RowsIndexed" -> {}},
     GridBoxDividers->{
      "Columns" -> {{False}}, "ColumnsIndexed" -> {}, "Rows" -> {{False}}, 
       "RowsIndexed" -> {}},
     GridBoxItemSize->{
      "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, 
       "RowsIndexed" -> {}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.5599999999999999]}, 
         Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
         Offset[0.2], {
          Offset[1.2]}, 
         Offset[0.2]}, "RowsIndexed" -> {}}],
    DefaultBaseStyle->{},
    FrameMargins->5],
   Deploy,
   DefaultBaseStyle->{Deployed -> True}],
  Out[16]]], "Output",
 CellChangeTimes->{{3.4455714245034637`*^9, 3.445571434122464*^9}}]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Unsupervised Learning", "Section",
 CellChangeTimes->{{3.4444530315591784`*^9, 3.44445303845511*^9}, {
  3.4444542956507196`*^9, 3.44445429565254*^9}, {3.4452257822623873`*^9, 
  3.445225790141061*^9}}],

Cell[CellGroupData[{

Cell["Principal Component Analysis", "Subsection",
 CellChangeTimes->{{3.444454372181445*^9, 3.444454376766625*^9}}],

Cell["\<\
We start out our analysis by performing a principal component analysis (PCA) \
on the expression data matrix. Performing a PCA is equivalent to calculating \
a singluar value decomposition (SVD) of the underlying expression matrix. A \
typical visualization of the result of a PCA is a 3D plot using the vector \
values of the three Eigenvectors associated with the three Eigenvalues of \
largest magnitude.\
\>", "Text",
 CellChangeTimes->{{3.445309108936242*^9, 3.44530931476332*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"svd", " ", "=", " ", 
   RowBox[{"SingularValueDecomposition", "[", " ", 
    RowBox[{"logIntensity", ",", " ", "3"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.44530934967472*^9, 3.4453094051711407`*^9}, {
  3.445309500959203*^9, 3.445309501270249*^9}, {3.445309536782473*^9, 
  3.445309539580854*^9}, {3.445310016508965*^9, 3.44531001674868*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"pcs", " ", "=", " ", 
   RowBox[{"svd", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], 
  ";"}]], "Input",
 CellChangeTimes->{{3.4453094110704823`*^9, 3.445309414157289*^9}, {
  3.445309694434029*^9, 3.445309697633157*^9}, {3.4453100310930433`*^9, 
  3.4453100805552073`*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"ListPointPlot3D", "[", 
  RowBox[{"pcs", ",", " ", 
   RowBox[{"AspectRatio", "\[Rule]", "1"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.445310153262682*^9, 3.445310159857964*^9}, {
  3.445310268761662*^9, 3.445310291458551*^9}}],

Cell[BoxData[
 Graphics3DBox[
  {Hue[0.67, 0.6, 0.6], Point3DBox[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MolLGcnN/38+eNUE2+F6KiUpeNS5gQKWuclgS7sMD
xR0JgYmV0DkkxzHkU4/c/mV14L1OQBErY3AqoAj9fdzu495gAoUPx6zZ4e/a
bs/faaefgraBqYxUDwOO8nj+OPY7/4Li/qj0ArC6n3vKZ6wAWXt8/jmKe6JO
lhlLc41HGloN5l59SXBbSJ8jBPOnjB0q/eHXAWv7Of6jXKKhpqQ4STGcn0bj
MGXzL0SGL4Z2byx3oLyVXB8FnPN8Sbv6g6uJqE2+v0tr4CnIJMSt1v+e31Bt
6wdqZbBjKSNBID4XVoVKQM+DgAWXMjOzmXpQXzGbNYywQ1cVoimcmL9VIan9
+qMcpEEaaV2QJkDE1S9xL/axjUlTC2bUojYx9vlQzOHeQfeIMZxz9Yki3Xhb
I2TdrUmzfdWABHoIy0s4j4YVM5mXXAktMZFRhGYLaCar8HFifTZR85qUUxWs
sTHq/X5UovUcrYlArEtIhAnbcrfBkNLhvLGXkWjIpm1dBvsXhrHH/pzsBFb+
0Xe+K3eR17DqUSrO80z6KWkPXz7wpWWXCy+3ouGXtTPvMOdCaZe3lSFtoHCg
8wA3QUfmb9XiV7Ce637HSWEQvxNhxR8d2KioIDpOqh/3h2Un85PJsUio36w6
Ih+SD682rbnv4T64aincf58ZBtu8dnbpnmqBsGfDDxk4z7dki8YpNSYsyHVf
jQ9rgAh9RH6Huc39paedY1SHWALX/Uh5DkhC9tVFDcyZEjLSd7meQMKd/Fv6
8f8OM/uVlkasN73Qmx0KqwIXIz4nFskedL35WGQ25jCxpb9RkqhHBko3m4Lq
aPB/nXxztw==
    "]]},
  AspectRatio->1,
  AutomaticImageSize->True,
  Axes->True,
  BoxRatios->{1, 1, 0.4},
  ImageSize->{417.176637059734, 401.69164640733464`},
  PlotRange->{{-0.08780147746157556, -0.08747472126049252}, \
{-0.19536953928250725`, 0.1927822663993608}, Automatic},
  PlotRangePadding->{{
     Scaled[0.02], 
     Scaled[0.02]}, {
     Scaled[0.02], 
     Scaled[0.02]}, {Automatic, Automatic}},
  ViewPoint->{-2.9010502930104463`, 1.4257131791487003`, 1.0006243691944086`},
  
  ViewVertical->{-0.5381842043574568, 0.274098182562079, 
   1.9925297182480999`}]], "Output",
 CellChangeTimes->{
  3.445310163798744*^9, {3.4453102709241543`*^9, 3.445310292993865*^9}}]
}, Open  ]],

Cell["\<\
TODO: Bring in the identifiers and series proper, and generate variations of \
this plot with different colors and shape labelings\
\>", "Text",
 CellChangeTimes->{{3.445310449175788*^9, 3.445310484953425*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Clustering", "Subsection",
 CellChangeTimes->{{3.44522580317557*^9, 3.4452258045803843`*^9}}],

Cell["Distance Metrics", "Subsubsection",
 CellChangeTimes->{{3.444454296954734*^9, 3.444454314668666*^9}}],

Cell["Partitioning Data", "Subsubsection",
 CellChangeTimes->{{3.4444543189851303`*^9, 3.444454347623087*^9}}],

Cell[CellGroupData[{

Cell["Hierarchical Clustering", "Subsubsection",
 CellChangeTimes->{{3.444454350502922*^9, 3.44445435514268*^9}}],

Cell[BoxData[
 RowBox[{"Needs", "[", "\"\<HierarchicalClustering`\>\"", "]"}]], "Input",
 CellChangeTimes->{{3.445310546736814*^9, 3.445310564993206*^9}}],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"DendrogramPlot", "[", 
  RowBox[{
   RowBox[{"Transpose", "[", "logRatio", "]"}], ",", " ", 
   RowBox[{"LeafLabels", "\[Rule]", "geneIDs"}], ",", 
   RowBox[{"Orientation", "\[Rule]", "Left"}]}], "]"}]], "Input",
 CellChangeTimes->{{3.445310570741963*^9, 3.44531058911762*^9}, {
  3.4453107365426493`*^9, 3.445310744092537*^9}}],

Cell[BoxData[
 RowBox[{"DendrogramPlot", "[", 
  RowBox[{
   RowBox[{"Transpose", "[", "logRatio", "]"}], ",", 
   RowBox[{"LeafLabels", "\[Rule]", "geneIDs"}], ",", 
   RowBox[{"Orientation", "\[Rule]", "Left"}]}], "]"}]], "Output",
 CellChangeTimes->{3.445310763012024*^9}]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Length", "[", "logRatio", "]"}]], "Input",
 CellChangeTimes->{{3.445310775522945*^9, 3.445310820424775*^9}}],

Cell[BoxData["0"], "Output",
 CellChangeTimes->{{3.445310778294159*^9, 3.4453108210295877`*^9}}]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["Next Steps and Further Reading", "Section",
 CellChangeTimes->{{3.444453413580114*^9, 3.44445342674747*^9}, {
  3.444454006056712*^9, 3.444454008584454*^9}, {3.4453932154296303`*^9, 
  3.44539321833986*^9}}],

Cell[CellGroupData[{

Cell["Next Steps", "Subsection",
 CellChangeTimes->{{3.445392897366765*^9, 3.445392898951851*^9}}],

Cell["\<\
In the next part of this tutrial series we will apply statistcial analysis \
methods to our data sets. ...\
\>", "Text",
 CellChangeTimes->{{3.445392906499016*^9, 3.445392956970704*^9}, {
  3.445393223870719*^9, 3.445393225404397*^9}}]
}, Open  ]],

Cell[CellGroupData[{

Cell["Further reading", "Subsection",
 CellChangeTimes->{{3.445392660117527*^9, 3.445392662367794*^9}}],

Cell["More on dimension reduction (PCA, MDS)", "Text",
 CellChangeTimes->{{3.445392678264183*^9, 3.4453926846797*^9}, {
  3.445393242877426*^9, 3.445393258024328*^9}}],

Cell["More on clustering algorithms", "Text",
 CellChangeTimes->{{3.445392678264183*^9, 3.44539270790241*^9}, {
  3.445392792037457*^9, 3.445392817898663*^9}, {3.445393266503709*^9, 
  3.445393272079364*^9}}],

Cell["Advanced stuff: optimal k, Gaussian mixture", "Text",
 CellChangeTimes->{{3.445392678264183*^9, 3.4453927803967323`*^9}, {
  3.445393276895875*^9, 3.4453932929572573`*^9}}]
}, Open  ]],

Cell["References", "Subsection",
 CellChangeTimes->{{3.4449222013566933`*^9, 3.444922202799799*^9}}],

Cell[CellGroupData[{

Cell["Links", "Subsection",
 CellChangeTimes->{{3.444922226882545*^9, 3.4449222275050173`*^9}}],

Cell[TextData[{
 StyleBox["The author can be contacted via email: ",
  FontSlant->"Italic"],
 ButtonBox["hwill@acm.org",
  BaseStyle->"Hyperlink",
  ButtonData->{
    URL["mailto:hwill@acm.org"], None},
  ButtonNote->"mailto:hwill@acm.org"],
 StyleBox[".",
  FontSlant->"Italic"]
}], "Text",
 CellChangeTimes->{{3.444954375605266*^9, 3.44495441355757*^9}, {
  3.444954451426589*^9, 3.4449544980252037`*^9}}]
}, Open  ]]
}, Open  ]]
}, Open  ]]
},
WindowSize->{961, 827},
WindowMargins->{{-4, Automatic}, {Automatic, 0}},
PrintingCopies->1,
PrintingPageRange->{1, Automatic},
PrintingOptions->{"PaperOrientation"->"Portrait"},
ShowSelection->True,
CellLabelAutoDelete->True,
FrontEndVersion->"7.0 for Mac OS X x86 (32-bit) (January 30, 2009)",
StyleDefinitions->FrontEnd`FileName[{"Creative"}, "NaturalColor.nb", 
  CharacterEncoding -> "UTF-8"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[CellGroupData[{
Cell[567, 22, 120, 1, 66, "Title"],
Cell[690, 25, 159, 2, 31, "Subtitle"],
Cell[852, 29, 48, 0, 25, "Subsubtitle"],
Cell[903, 31, 962, 18, 41, "Text"],
Cell[1868, 51, 2084, 39, 45, "Text"],
Cell[CellGroupData[{
Cell[3977, 94, 198, 3, 72, "Section"],
Cell[CellGroupData[{
Cell[4200, 101, 117, 1, 34, "Subsection"],
Cell[4320, 104, 681, 11, 71, "Text"],
Cell[5004, 117, 556, 9, 56, "Text"],
Cell[5563, 128, 844, 13, 86, "Text"],
Cell[6410, 143, 612, 9, 71, "Text"]
}, Open  ]],
Cell[CellGroupData[{
Cell[7059, 157, 110, 1, 34, "Subsection"],
Cell[7172, 160, 1581, 25, 116, "Text"]
}, Open  ]],
Cell[CellGroupData[{
Cell[8790, 190, 124, 1, 34, "Subsection"],
Cell[8917, 193, 349, 7, 26, "Text"],
Cell[9269, 202, 225, 4, 37, "Input"]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[9543, 212, 110, 1, 72, "Section"],
Cell[CellGroupData[{
Cell[9678, 217, 114, 1, 34, "Subsection"],
Cell[9795, 220, 62, 1, 37, "Input"],
Cell[9860, 223, 1102, 31, 113, "Input"],
Cell[10965, 256, 126, 1, 26, "Text"],
Cell[CellGroupData[{
Cell[11116, 261, 99, 1, 37, "Input"],
Cell[11218, 264, 5572, 141, 163, "Output"]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[16851, 412, 208, 3, 72, "Section"],
Cell[CellGroupData[{
Cell[17084, 419, 116, 1, 34, "Subsection"],
Cell[17203, 422, 496, 8, 56, "Text"],
Cell[17702, 432, 389, 7, 37, "Input"],
Cell[18094, 441, 322, 7, 37, "Input"],
Cell[CellGroupData[{
Cell[18441, 452, 253, 5, 37, "Input"],
Cell[18697, 459, 4791, 88, 427, "Output"]
}, Open  ]],
Cell[23503, 550, 220, 4, 26, "Text"]
}, Open  ]],
Cell[CellGroupData[{
Cell[23760, 559, 99, 1, 34, "Subsection"],
Cell[23862, 562, 107, 1, 24, "Subsubsection"],
Cell[23972, 565, 110, 1, 18, "Subsubsection"],
Cell[CellGroupData[{
Cell[24107, 570, 113, 1, 18, "Subsubsection"],
Cell[24223, 573, 154, 2, 37, "Input"],
Cell[CellGroupData[{
Cell[24402, 579, 353, 7, 37, "Input"],
Cell[24758, 588, 275, 6, 37, "Output"]
}, Open  ]],
Cell[CellGroupData[{
Cell[25070, 599, 132, 2, 37, "Input"],
Cell[25205, 603, 96, 1, 37, "Output"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[25374, 612, 213, 3, 72, "Section"],
Cell[CellGroupData[{
Cell[25612, 619, 98, 1, 34, "Subsection"],
Cell[25713, 622, 245, 5, 26, "Text"]
}, Open  ]],
Cell[CellGroupData[{
Cell[25995, 632, 103, 1, 34, "Subsection"],
Cell[26101, 635, 167, 2, 26, "Text"],
Cell[26271, 639, 208, 3, 26, "Text"],
Cell[26482, 644, 178, 2, 26, "Text"]
}, Open  ]],
Cell[26675, 649, 100, 1, 34, "Subsection"],
Cell[CellGroupData[{
Cell[26800, 654, 95, 1, 26, "Subsection"],
Cell[26898, 657, 407, 12, 26, "Text"]
}, Open  ]]
}, Open  ]]
}, Open  ]]
}
]
*)

(* End of internal cache information *)
